package com.aistar.hotel.service.impl;


import com.aistar.common.util.IdWorker;
import com.aistar.hotel.entity.RoomDetails;
import com.aistar.hotel.mapper.RoomDetailsMapper;
import com.aistar.hotel.service.RoomDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * Created by wubin on 2019/6/23.
 */
@Service
@Transactional
public class RoomDetailsServiceImpl implements RoomDetailsService {
    @Autowired
    private RoomDetailsMapper roomDetailsMapper;
    @Autowired
    private IdWorker idWorker;
    @Override
    public List<RoomDetails> findAll(String roomname) {
        return roomDetailsMapper.findAll(roomname);
    }

    @Override
    public RoomDetails findById(String id) {
        return roomDetailsMapper.findById(id);
    }

    @Override
    public void save(RoomDetails roomDetails) {


        roomDetailsMapper.save(roomDetails);
    }

    @Override
    public void delete(String id) {
roomDetailsMapper.delete(id);
    }

    @Override
    public void update(RoomDetails roomDetails) {

        roomDetailsMapper.update(roomDetails);
    }
}
